<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <input type="text" value="北京市">
    <input type="text" value="朝阳区"><button onclick="add()">传参</button>
</body>
<script>
    let input1 = document.getElementsByTagName('input')[0]
    let input2 = document.getElementsByTagName('input')[1]
    function add(){
       xxx(input1.value,input2.value)
    }
    function xxx(val1,val2){
        alert(val1)
        alert(val2)
    }
</script>
</html>